@model T2.WebSecurity.ASPMVC.ViewModel.ApplicationRolesViewModel
         
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title></title>
</head>
<body>
	
	<script type="text/javascript">

        jQuery(document).ready(function() {
        $('#nav').show();
       
		
		 $('#Details').click(function(event) {
				$.ajax({
					url: '@Url.Content("~/ApplicationRoles/ApplicationRolesDetails/")' + ApplicationRoleId,
					cache: false,
					success: function (html) {
					$('#Main').html(html);
					return false;
				}});
			});
			 $('#Add').click(function(event) {
				$.ajax({
					url: '@Url.Content("~/ApplicationRoles/NewApplicationRolesForm/")',
					cache: false,
					success: function (html) {
					$('#Dialog').html(html);
					$('#Dialog').dialog({modal:true});
					return false;
				}});
			});
			 $('#Update').click(function(event) {
				$.ajax({
					url: '@Url.Content("~/ApplicationRoles/UpdateApplicationRolesForm/")' + ApplicationRoleId,
					cache: false,
					success: function (html) {
					$('#Dialog').html(html);
					$('#Dialog').dialog({modal:true});
					return false;
				}});
			});
			 $('#Search').click(function(event) {
				$.ajax({
					url: '@Url.Content("~/ApplicationRoles/ApplicationRolesSearchAccordion/")' + ApplicationRoleId,
					cache: false,
					success: function (html) {
					$('#Main').html(html);
					return false;
				}});
				$.ajax({
					url: '@Url.Content("~/ApplicationRoles/ApplicationRolesAccordion/")',
					cache: false,
					success: function (html) {
					$('#Nav').html(html);
					return false;
				}});
			});
			 $('#UsersInRoles1').click(function(event) {
					$.ajax({
						url: '@Url.Content("~/UsersInRoles/UsersInRolesGrid/")',
						cache: false,
						success: function (html) {
						$('#Main').html(html);
						$("#applicationroleslist").setGridParam({ datatype: 'json', url: "./UsersInRoles/GetBy_ApplicationRoles_UsersInRoles_ByParent/" + ApplicationRoleId }).trigger("reloadGrid");
						return false;
					}});
					$.ajax({
						url: '@Url.Content("~/UsersInRoles/UsersInRolesAccordion/")',
						cache: false,
						success: function (html) {
						$('#Nav').html(html);
						return false;
					}});
				});
					
					$("#applicationrolesaccordion1").accordion();
			
			
			    }); 
			    </script>
			     <div id="applicationrolesaccordion1">
			    <h3><a href="#">Edit Options</a></h3>
			     <ul>
			<li><a href="#" id="Add">Add</a></li>
			<li><a href="#" id="Update">Update</a></li>
			<li><a href="#" id="Search">Search</a></li>
			<li><a href="#" id="Remove">Remove</a></li>
			<li><a href="#" id="Details">Details</a></li>
					
				 </ul>
				 
				  <h3><a href="#">Related Items</a></h3>
				  <ul>
						 <li><a href="#" id='UsersInRoles1'>Users In Roles</a></li>
			               
			            </ul>
			    </div>
			</body>
			</html>